<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>My JSP 'a.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript">
		window.onload = function() {
			var person = {"name":"zhangsan", "age":18, "gender":"male"};
			document.getElementById("h3_1").innerHTML = person.name +", "+person.age +", "+ person.gender;
			
			var str = "1 + 2";
			var result = eval("("+ str +")");
			document.getElementById("h3_2").innerHTML = result;
			
			var strJson = "{\"name\":\"zhangsan\", \"age\":18, \"gender\":\"male\"}";
			var person = eval("("+ strJson +")");
			document.getElementById("h3_3").innerHTML = person.name +", "+person.age +", "+ person.gender;
		};
	</script>
  </head>
  
  <body>
	<h1>JSON 1</h1>
	<h3 id="h3_1"></h3>
	<h3 id="h3_2"></h3>
	<h3 id="h3_3"></h3>
  </body>
</html>
